package com.bantang.manager;

import com.yupi.yucongming.dev.client.YuCongMingClient;
import com.yupi.yucongming.dev.common.BaseResponse;
import com.yupi.yucongming.dev.model.DevChatRequest;
import com.yupi.yucongming.dev.model.DevChatResponse;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AiManager {

    @Resource
    private YuCongMingClient yuCongMingClient;

    public String doChat(String message){
        DevChatRequest devChatRequest = new DevChatRequest();
//        devChatRequest.setModelId(1651468516836098050L); 鱼聪明
        devChatRequest.setModelId(1659171950288818178L); //智能BI
        devChatRequest.setMessage(message);

        BaseResponse<DevChatResponse> response =  yuCongMingClient.doChat(devChatRequest);
        if (response == null){
            System.out.println("错误");
        }
        return response.getData().getContent();
    }
}
